-- GENERATED SPELL FOR [Priest of Rhunok] --


function spell0_28417(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(9734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28417', 2500, 1)
end

function spell1_28417(pUnit, Event) --@Jump Attack,n/a--
pUnit:FullCastSpellOnTarget(61227,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28417', 583, 1)
end

function spell2_28417(pUnit, Event) --@Penance,n/a--
pUnit:FullCastSpellOnTarget(54520,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28417', 634, 1)
end

function spell3_28417(pUnit, Event) --@Power Infusion,n/a--
pUnit:FullCastSpellOnTarget(54521,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28417', 15283, 1)
end

function Sorts_28417(pUnit, Event)
local choix_sorts_28417 = math.random(0, 3)
if choix_sorts_28417 == 0 then
pUnit:RegisterEvent('spell0_28417', 1, 1)
end
if choix_sorts_28417 == 1 then
pUnit:RegisterEvent('spell1_28417', 1, 1)
end
if choix_sorts_28417 == 2 then
pUnit:RegisterEvent('spell2_28417', 1, 1)
end
if choix_sorts_28417 == 3 then
pUnit:RegisterEvent('spell3_28417', 1, 1)
end
end

function mob28417_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28417', math.random(1500, 3000), 1)
end

function mob28417_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28417_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28417_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28417, 1, 'mob28417_Action')
RegisterUnitEvent(28417, 2, 'mob28417_Leave')
RegisterUnitEvent(28417, 3, 'mob28417_Kill')
RegisterUnitEvent(28417, 4, 'mob28417_Die')
